package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SmsDepartmentMapper;
import com.ruoyi.system.domain.SmsDepartment;
import com.ruoyi.system.service.ISmsDepartmentService;

/**
 * 检举部门Service业务层处理
 *
 * @author DRIES
 * @date 2022-03-09
 */
@Service
public class SmsDepartmentServiceImpl implements ISmsDepartmentService
{
    @Autowired
    private SmsDepartmentMapper smsDepartmentMapper;

    /**
     * 查询检举部门
     *
     * @param id 检举部门主键
     * @return 检举部门
     */
    @Override
    public SmsDepartment selectSmsDepartmentById(Long id)
    {
        return smsDepartmentMapper.selectSmsDepartmentById(id);
    }

    /**
     * 查询检举部门列表
     *
     * @param smsDepartment 检举部门
     * @return 检举部门
     */
    @Override
    public List<SmsDepartment> selectSmsDepartmentList(SmsDepartment smsDepartment)
    {
        return smsDepartmentMapper.selectSmsDepartmentList(smsDepartment);
    }

    /**
     * 新增检举部门
     *
     * @param smsDepartment 检举部门
     * @return 结果
     */
    @Override
    public int insertSmsDepartment(SmsDepartment smsDepartment)
    {
        smsDepartment.setCreateTime(DateUtils.getNowDate());
        return smsDepartmentMapper.insertSmsDepartment(smsDepartment);
    }

    /**
     * 修改检举部门
     *
     * @param smsDepartment 检举部门
     * @return 结果
     */
    @Override
    public int updateSmsDepartment(SmsDepartment smsDepartment)
    {
        smsDepartment.setUpdateTime(DateUtils.getNowDate());
        return smsDepartmentMapper.updateSmsDepartment(smsDepartment);
    }

    /**
     * 批量删除检举部门
     *
     * @param ids 需要删除的检举部门主键
     * @return 结果
     */
    @Override
    public int deleteSmsDepartmentByIds(Long[] ids)
    {
        return smsDepartmentMapper.deleteSmsDepartmentByIds(ids);
    }

    /**
     * 删除检举部门信息
     *
     * @param id 检举部门主键
     * @return 结果
     */
    @Override
    public int deleteSmsDepartmentById(Long id)
    {
        return smsDepartmentMapper.deleteSmsDepartmentById(id);
    }
}
